<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>登录</title>
    <link rel="stylesheet" href="./css/weui.min.css" />
  </head>
  <style>
    .navbar {
      padding: 0 10px;
      height: 44px;
      line-height: 44px;
    }
    .placeholder {
      text-align: center;
    }
    .container {
      margin: 10px;
    }
    .button {
      margin-top: 30px;
    }
    .weui-btn {
      width: 100%;
    }
  </style>
  <body data-weui-theme="light">
    <div class="weui-flex navbar">
      <div class="weui-flex__item"><div class="placeholder">登录</div></div>
      <div><div class="placeholder">退出</div></div>
    </div>
    <div class="container">
      <div class="weui-cell">
        <div class="weui-cell__hd"><span class="weui-label">手机号:</span></div>
        <div class="weui-cell__bd weui-flex">
          <input
            id="js_input1"
            class="weui-input"
            type="text"
            placeholder="请输入手机号"
          />
        </div>
      </div>
      <div class="weui-cell">
        <div class="weui-cell__hd"><span class="weui-label">密码:</span></div>
        <div class="weui-cell__bd weui-flex">
          <input
            id="js_input2"
            class="weui-input"
            type="password"
            placeholder="请输入密码"
          />
        </div>
      </div>
      <div class="button">
        <div id="loginBtn" role="button" class="weui-btn weui-btn_primary">
          登录
        </div>
        <a id="registBtn" role="button" class="weui-btn weui-btn_default" href="./register.html">
          注册
        </a>
      </div>
    </div>
    <script src="./js/zepto.min.js"></script>
    <script src="./js/weui.min.js"></script>
    <script type="text/javascript">
      // 点击登录按钮操作
      var loginBtn = $("#loginBtn");
      loginBtn.on("click", function (e) {
        var js_input1_val = $("#js_input1").val();
        var js_input2_val = $("#js_input2").val();
        console.log(js_input1_val, js_input2_val);
        window.location.href = "index.html";
      });
    </script>
  </body>
</html>
